package com.explorati.interview.interview.chaptereight;

import java.io.Serializable;

//线程类
public class ThreadPoolTask implements Runnable, Serializable {

	private static final long serialVersionUID = 0;

	private static int consumeTaskSleepTime = 2000;
	private String threadPoolTaskData;

	public ThreadPoolTask(String threadPoolTaskData) {
		this.threadPoolTaskData = threadPoolTaskData;
	}

	@Override
	public void run() {
		System.out.println("start .." + threadPoolTaskData);
		try {
			Thread.sleep(consumeTaskSleepTime);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		threadPoolTaskData = null;
	}

}
